<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>核验详情</title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link href="/layer/mobile/need/layer.css">
    <link href="/css/picc/common_new.css" rel="stylesheet" type="text/css"/>
    <link href="/css/picc/iconfont.css" rel="stylesheet" type="text/css"/>
    <link href="/css/picc/base.css" rel="stylesheet" type="text/css"/>
    <link href="/css/picc/verification.css" rel="stylesheet" type="text/css"/>
    <script src="/app/js/flexible.js"></script>
</head>
<body class="verification">
<div class="content ">
    <div class="verification-div1">
        <img src="/img/picc/picc@2x.png" alt="picc" class="picc">
        <img src="/img/picc/xiaoche@2x.png" alt="车" class="div1-img">
    </div>
    <form id="verification" class="forName">
        <input type="hidden" name="card_code" id="card_code" th:value="${card_code}"/>

        <div class="groupInput">
            	<span class="inputName">
                    *车牌照片：
                </span>
            	<div id="preview" style="display: none">
                    <img id="imghead" class="img-circle" width=100 height=100 border=0 src=''>
                </div>

            <input type="button" value="上传车牌照片" id="" onclick="chooseImage('pln')"/>
            <input type="hidden" name="licensePlateNumberPhoto" id="licensePlateNumberPhoto"/>
        </div>
        <div class="groupInput">

            <div id="previewSecond" style="display:none ">
                <img id="carBodyNumberimg" class="img-circle" style="max-width: 100%;" width=100 height=100 border=0
                     src=''>
            </div>
            <input type="button" value="上传车身照片" id="" onclick="chooseImage('cbn')"/>
                <input type="hidden" name="carPhoto" id="carPhoto"/>
        </div>
        <div class="groupInput">

					<span class="inputName">

						*车牌号码：
					</span>


            <input type="text" name="licensePlateNumber" readonly id="licensePlateNumber"
                   class="updatePhoto" placeholder="上传图片后系统自动识别"/>

            <label id="licensePlateNumberValidation">车牌号不正确</label>
        </div>




        <div style="display: none" class="more-box">
            <div class="groupInput">
						<span class="inputName">
							车架号码：
						</span>
                <input type="text" name="frameNumber" id="frameNumber" onblur="checkFrameNumber()"
                       placeholder="请输入您的车架号码"/>
                <label id="frameNumberValidation">车架号不正确</label>
            </div>
            <div class="groupInput">
						<span class="inputName">
							发动机号：
						</span>
                <input type="text" name="engineNumber" id="engineNumber" onblur="checkEngineNumber();"
                       placeholder="请输入您的发动机"/>
                <label id="engineNumberValidation">发动机号不正确</label>
            </div>

            <div class="groupInput">
						<span class="inputName">
							核销油升数：
						</span>
                <input type="text" name="verificationOilNum" id="verificationOilNum" onblur="checkVerificationOilNum();"
                       placeholder="请输入您的核销油升数"/>
                <label id="verificationOilNumValidation">核销油升数不正确</label>
            </div>

            <div class="groupInput">
						<span class="inputName">
							注册日期：
						</span>
                <input type="text" name="registrationDate" id="registrationDate" placeholder="请输入您的注册日期"/>
            </div>
        </div>
        <div class="groupInput">
            <button type="button" class="show-more">显示更多选项</button>
        </div>
        <input type="button" id="submit" value="保存" onclick="save()"/>
        <p class="tips"><span>*温馨提示:</span>车身照片需要上传车头至车尾斜45度角照片带*为必填项目 </p>
    </form>
    <div id="datePlugin"></div>
</div>
<div class="car-brand">
    <div class="car-left" id="carBrandBox">
        <div class="car-nav" id="nav_popular">
            <p>热门品牌</p>
            <div class="brand-list brand-hot">
                <ul class="clearfix">
                </ul>
            </div>
        </div>
    </div>
</div>
<div class="fixed-nav">
    <ul>
    </ul>
</div>
<div class="toTop"><i class="yhl_icon icon-fanhuidaodingbu c-info"></i></div>
<div class="close-brand"><i class="yhl_icon icon-close"></i></div>
<div class="side-car">
    <div class="sideh clearfix">
        <img src="">
        <span></span>
    </div>
    <div class="sidec">
        <ul class="car-type" id="carVehicles">
        </ul>
    </div>
</div>
<div class="side-car-models">
    <div class="sideh clearfix">
        <img src="">
        <span></span>
    </div>
    <div class="sidec">
        <ul class="car-models" id="carModels">
        </ul>
    </div>

</div>
<div class="mask"></div>
<div class="verification-logo">
    <img src="/img/picc/logo@2x.png" alt="" class="logo">
</div>
<script src="/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="/js/picc/ajaxfileupload.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="/layer/mobile/layer.js"></script>
<script type="text/javascript" src="/js/picc/date.js"></script>
<script type="text/javascript" src="/js/picc/iscroll.js"></script>
<script>
    $(function () {
        $('#registrationDate').date();
        //显示更多选项
        var show_flag = true;
        $('.show-more').click(function () {
            if (show_flag == true) {
                $('.more-box').slideDown();
                $(this).text('隐藏更多选项')
                show_flag = false;
            } else {
                $('.more-box').slideUp();
                $(this).text('显示更多选项')
                show_flag = true;
            }
        })
        //选择车型
        $("#chooseCar").on('click', function () {
            $('.car-brand').addClass('show');
            $('.fixed-nav').show(600);
            $('.close-brand').show(600);
        })
        //品牌选择
        $(document).on('click', '.car-brand .brand-list ul li', function () {
            var brandId = $(this).attr('data-id');
            var brandImg = $(this).find('img').attr('src');
            var brandName = $(this).find('p').text();
            $('.car-brand .brand-list ul li').removeClass('active');
            $(this).addClass('active');
            $.ajax({
                url: '/rest/car/vehicles/getbybrandid/' + brandId,
                type: 'GET',
                dataType: 'json',//服务器返回json格式数据
                success: function (data) {
                    if (data.code == 1) {
                        var html = '';
                        var list = data.data;
                        for (var i = 0; i < list.length; i++) {
                            html += '<li data-id="' + list[i].id + '">' +
                                '<div class="imgbox">' +
                                '<img src="' + list[i].photo + '" title="' + list[i].name + '">' +
                                '</div>' +
                                '<div class="tbox">' +
                                '<h4>' + list[i].name + '</h4>' +
                                '</div>' +
                                '</li>';
                        }
                        $('#carVehicles').html(html);
                        $('.side-car .sideh>img').attr({'src': brandImg, 'title': brandName});
                        $('.side-car .sideh>span').text(brandName);
                        $('.mask').show();
                        $('.side-car').addClass('show');
                    }
                },
                error: function (xhr, type, errorThrown) {
                    console.log(type)
                }
            })
        })
        //车系选择
        $(document).on('click', '.side-car .car-type li', function () {
            var vehicleId = $(this).attr('data-id');
            var vehicleImg = $(this).find('.imgbox img').attr('src');
            var vehicleName = $(this).find('.tbox h4').text();
            $(this).addClass('active').siblings().removeClass('active');
            $.ajax({
                url: '/rest/car/models/getbyvehiclesid/' + vehicleId,
                type: 'GET',
                dataType: 'json',//服务器返回json格式数据
                success: function (data) {
                    if (data.code == 1) {
                        var html = '';
                        var list = data.data;
                        for (var i = 0; i < list.length; i++) {
                            html += '<li data-id="' + list[i].id + '">' +
                                '<div class="imgbox">' +
                                '<img src="' + list[i].photo + '" title="' + list[i].name + '">' +
                                '</div>' +
                                '<div class="tbox">' +
                                '<h4>' + list[i].name + '</h4>' +
                                '</div>' +
                                '</li>';
                        }
                        $('#carModels').html(html);
                        $('.side-car-models').addClass('show')
                        $('.side-car-models .sideh>img').attr({'src': vehicleImg, 'title': vehicleName});
                        $('.side-car-models .sideh>span').text(vehicleName);
                    }
                },
                error: function (xhr, type, errorThrown) {
                    console.log(type)
                }
            })
        })
        //车型选择
        $(document).on('click', '.side-car-models .car-models li', function () {
           	 $(this).addClass('active').siblings().removeClass('active');
        	   var brandText = $('.car-brand .brand-list li.active').find('p').text();
               var typeText = $('.car-type li.active').find('h4').text();
               var modelsText = $('.car-models li.active').find('h4').text();
               $('.mask').hide();
               $('.side-car-models').removeClass('show')
               $('.side-car').removeClass('show')
               $('.car-brand').removeClass('show')
               $('.fixed-nav').hide();
               $('.close-brand').hide();
               $('.typeAndModel').find('#typeAndModel').html(brandText + ' ' + typeText + ' ' + modelsText);
               $('#carHidden').val(brandText + ' ' + typeText + ' ' + modelsText);

        })
        //车型确定
       /*  $(".side-car-models .btn-confirm").on('click', function () {
            var id = $('.side-car-models .car-models li.active').attr('data-id');
            if (!id) {
                layer.open({
                    content: '请选择车型',
                    btn: '确定',
                    shadeClose: false
                });
                return false;
            }
            var brandText = $('.car-brand .brand-list li.active').find('p').text();
            var typeText = $('.car-type li.active').find('h4').text();
            var modelsText = $('.car-models li.active').find('h4').text();
            $('.mask').hide();
            $('.side-car-models').removeClass('show')
            $('.side-car').removeClass('show')
            $('.car-brand').removeClass('show')
            $('.fixed-nav').hide();
            $('.close-brand').hide();
            $('.typeAndModel').find('#typeAndModel').html(brandText + ' ' + typeText + ' ' + modelsText);
            $('#carHidden').val(brandText + ' ' + typeText + ' ' + modelsText);
        })
        //车型返回
        $(".side-car-models .btn-return").on('click', function () {
            $('.side-car-models').removeClass('show')
        }) */
        //点击遮罩
        $('.mask').on('click', function () {
            $(this).hide();
            $('.side-car').removeClass('show');
            $('.side-car-models').removeClass('show');
        })
        //字母列表
        $('.fixed-nav ul').html('<li><a href="#nav_popular">热</a></li>');
        for (var i = 0; i <= 25; i++) {
            var li = $('<li><a href="#nav_' + String.fromCharCode((65 + i)) + '">' + String.fromCharCode((65 + i)) + '</a></li>');
            $('.fixed-nav ul').append(li);
        }
        ;
        $('.fixed-nav ul li').click(function (event) {
            var objOffset = $('.car-brand .car-left .car-nav').eq($(this).index()).offset().top;
            var parentOffset = $('.car-brand .car-left').offset().top;
            var scrollOffset = objOffset - parentOffset;
            $('.car-brand').stop().animate({scrollTop: scrollOffset + 'px'}, 'slow');
        });
        //滑动到顶部
        $('.car-brand').scroll(function () {
            if ($('.car-brand').scrollTop() > 300) {
                $('.toTop').fadeIn(300);
            } else {
                $('.toTop').fadeOut(200);
            }
        });
        $('.toTop').click(function () {
            $('.car-brand').stop().animate({scrollTop: 0}, 'slow');
            return false;
        })
        //关闭品牌选择
        $('.close-brand').click(function () {
            $('.car-brand').removeClass('show')
            $('.fixed-nav').hide();
            $('.close-brand').hide();
        })
        //热门品牌
      //  getPopularBrand();

        //获取26个字母品牌
      //  getAllBrand();
    });

    //热门品牌
    function getPopularBrand() {
        $.ajax({
            url: '/rest/car/brands/popular',
            type: 'GET',
            dataType: 'json',//服务器返回json格式数据
            success: function (data) {
                if (data.code == 1) {
                    var html = '';
                    var list = data.data;
                    for (var i = 0; i < list.length; i++) {
                        html += '<li data-id="' + list[i].id + '">' +
                            '<img src="' + list[i].icon + '" title="' + list[i].name + '">' +
                            '<p>' + list[i].name + '</p>' +
                            '</li>';
                    }
                    $('#nav_popular ul').html(html);
                }
            },
            error: function (xhr, type, errorThrown) {
                console.log(type)
            }
        })
    }

    //获取26个字母品牌
    function getAllBrand() {
        for (var i = 0; i <= 25; i++) {
            var carNav = '<div class="car-nav" id="nav_' + String.fromCharCode((65 + i)) + '">' +
                '<p>' + String.fromCharCode((65 + i)) + '</p>' +
                '<div class="brand-list">' +
                '<ul></ul> </div></div>';
            $('#carBrandBox').append(carNav);
            getTypeByBrand(String.fromCharCode((65 + i)))
        }
    }

    //根据字母获取品牌
    function getTypeByBrand(type) {
        $.ajax({
            url: '/rest/car/brands/getbyclassification/' + type,
            type: 'GET',
            dataType: 'json',//服务器返回json格式数据
            success: function (data) {
                if (data.code == 1) {
                    var html = '';
                    var list = data.data;
                    for (var i = 0; i < list.length; i++) {
                        html += '<li class="clearfix" data-id="' + list[i].id + '">' +
                            '<img src="' + list[i].icon + '" title="' + list[i].name + '">' +
                            '<p>' + list[i].name + '</p>' +
                            '</li>';
                    }
                    $('#nav_' + type + ' ul').html(html);
                }
            },
            error: function (xhr, type, errorThrown) {
                console.log(type)
            }
        })
    }
</script>
<script type="text/javascript" th:inline="javascript">
    //表单校验
    var licensePlateNumberValidation = document.getElementById("licensePlateNumberValidation");
    var licensePlateNumber = document.getElementById("licensePlateNumber");
    var frameNumber = document.getElementById("frameNumber");
    var engineNumber = document.getElementById("engineNumber");
    var verificationOilNum = document.getElementById("verificationOilNum");
    function checkLicensePlateNumber() {
        var re = /^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z_0-9]{5}$/;
        if (licensePlateNumber.value.search(re) == -1) {
            licensePlateNumberValidation.style.display = 'block';
            /*	licensePlateNumber.style.border = 'red solid 1px';*/
            licensePlateNumber.placeholder = '';

            return false;
        } else {
            licensePlateNumberValidation.style.display = 'none';
            licensePlateNumber.style.border = '0';
            licensePlateNumber.placeholder = '';

        }
    }


    function checkFrameNumber() {
        var regx = /^[\u9FA5A-Za-z0-9]+$/
        if (regx.test(frameNumber.value)) {
            frameNumberValidation.style.display = 'none';
            frameNumber.style.border = '0';
            frameNumber.placeholder = '';
        } else {
            frameNumberValidation.style.display = 'block';
            /*	frameNumber.style.border = 'red solid 1px';*/
            frameNumber.placeholder = '';
            return false;
        }
    }

    function checkEngineNumber() {
        var regx = /^[\u9FA5A-Za-z0-9]+$/
        if (regx.test(engineNumber.value)) {
            engineNumberValidation.style.display = 'none';
            engineNumber.style.border = '0';
            engineNumber.placeholder = '';
        } else {
            engineNumberValidation.style.display = 'block';
            /*engineNumber.style.border = 'red solid 1px';*/
            engineNumber.placeholder = '';
            return false;
        }
    }
    function checkVerificationOilNum() {
        var regx = /^\d+(\.\d+)?$/
        if (regx.test(verificationOilNum.value)) {
            verificationOilNumValidation.style.display = 'none';
            verificationOilNum.style.border = '0';
            verificationOilNum.placeholder = '';
        } else {
            verificationOilNumValidation.style.display = 'block';
            verificationOilNum.placeholder = '';
            return false;
        }
    }

    function checkCarBrand() {
        var regx = /^[a-zA-Z][a-zA-Z0-9_ ]+$/
        if (regx.test(carBrand.value)) {
            carBrandValidation.style.display = 'none';
            carBrand.style.border = '0';
            carBrand.placeholder = '';
            return false;
        } else {
            carBrandValidation.style.display = 'block';
            carBrand.style.border = 'red solid 1px';
            carBrand.placeholder = '';
            return false;
        }
    }

    function checkModel() {
        var regx = /^[a-zA-Z][a-zA-Z0-9]+$/
        if (regx.test(models.value)) {
            modelsValidation.style.display = 'none';
            models.style.border = '0';
            models.placeholder = '';
        } else {
            modelsValidation.style.display = 'block';
            models.style.border = 'red solid 1px';
            models.placeholder = '';
            return false;
        }
    }


     alert([[${sign_info}]]);
    console.log( [[${sign_info}]]);
    wx.config({
        debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: [[${sign_info['appid']}]], // 必填，公众号的唯一标识
        timestamp: [[${sign_info['timestamp']}]], // 必填，生成签名的时间戳
        nonceStr: [[${sign_info['nonceStr']}]], // 必填，生成签名的随机串
        signature: [[${sign_info['signature']}]],// 必填，签名，见附录1
        jsApiList: ['scanQRCode' ,'chooseImage', 'previewImage', 'uploadImage', 'downloadImage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });
  /*  wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: '${sign_info.appid}', // 必填，公众号的唯一标识
        timestamp: '${sign_info.timestamp}', // 必填，生成签名的时间戳
        nonceStr: '${sign_info.nonceStr}', // 必填，生成签名的随机串
        signature: '${sign_info.signature}',// 必填，签名，见附录1
        jsApiList: ['scanQRCode', 'chooseImage', 'previewImage', 'uploadImage', 'downloadImage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });*/

    function chooseImage(type) {
        wx.chooseImage({
            count: 1, // 默认9
            sizeType: ['compressed'], // 可以指定是原图还是压缩图，默认二者都有
            sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
            success: function (res) {
                var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
                for (var i = 0; i < localIds.length; i++) {
                    uploadImg(localIds[i].toString(), type)
                }
            }
        });
    }

    function uploadImg(localIds, type) {
        wx.uploadImage({
            localId: localIds, // 需要上传的图片的本地ID，由chooseImage接口获得
            isShowProgressTips: 1, // 默认为1，显示进度提示
            success: function (res) {
                var serverId = res.serverId; // 返回图片的微信服务器端ID
                $.ajax({
                    url: "/verification/getpic/" + serverId,
                    data: {
                        "type": type
                    },
                    type: "get",
                    dataType: "json",
                    success: function (data) {
                        var data=JSON.parse(data);
                        if (data.code==1){
                            alert("111")
                            if (type == "pln") {
                                alert("222")
                                alert(data);
                                $("#imghead").attr("src", data.fastdfsDomainUrl+data.path);
                                $("#licensePlateNumberPhoto").attr("value",data.path);
                                $("#preview").show();
                                if (data.data != undefined && data.data.code != null && data.data.code != undefined && data.data.code != "" && data.data.code == 200) {
                                    if ((data.data.data.confidence1 +
                                            data.data.data.confidence2 +
                                            data.data.data.confidence3 +
                                            data.data.data.confidence4 +
                                            data.data.data.confidence5 +
                                            data.data.data.confidence6 +
                                            data.data.data.confidence7) / 7 < 0.8) {
                                        layer.open({
                                            content: "识别成功请核查车牌号是否正确"
                                            , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                                            , time: 3
                                        });
                                        $("#licensePlateNumber").val(data.data.data.number)
                                    } else {
                                        layer.open({
                                            content: "车牌号识别成功"
                                            , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                                            , time: 3
                                        });
                                        $("#licensePlateNumber").val(data.data.data.number)
                                        $("#licensePlateNumberValidation").hide
                                            = document.getElementById("licensePlateNumber");
                                        licensePlateNumber.style.border = '0';
                                        licensePlateNumber.placeholder = '';
                                    }

                                } else {
                                    layer.open({
                                        content: "未识别到车牌请上传清晰的车牌照"
                                        , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                                        , time: 3
                                    });
                                    $("#licensePlateNumber").val("")
                                }


                            }
                            if (type == "cbn") {
                                alert("1114")
                                layer.open({
                                    content: data.msg
                                    , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                                    , time: 3
                                });
                                $("#carBodyNumberimg").attr("src", data.fastdfsDomainUrl+data.path);
                               alert($("#carBodyNumberimg").attr("src"))
                                $("#carPhoto").attr("value",data.path);

                                $("#previewSecond").show();
                            }
                        }else {
                            alert("1115")
                            layer.open({
                                content: "未识别到车牌请上传清晰的车牌照"
                                , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                                , time: 3
                            });
                        }

                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        alert("提交失败" + textStatus);
                    }

                });

            }

        });
    }

    //使用<input type="file">标签上传图片,不使用微信上传图片
    /*function uploadcarNumPhoto(obj, type) {
        $.ajaxFileUpload({
            url : "/rest/picture/fileUpload",
            secureuri : false,// 一般设置为false
            fileElementId : type,// 文件上传表单的id <input type="file" id="fileUpload" name="file" />
            dataType : 'json',// 返回值类型 一般设置为json
            data: {'type': type},

            success : function(data) // 服务器成功响应处理函数
            {
                alert("请求成功")
                if (data.code===200){
                    $("#imghead").attr("src", "http://192.168.54.55/"+data.path);
                    $("#preview").show();
                    if (data.data != undefined && data.data.code != null && data.data.code != undefined && data.data.code != "" && data.data.code == 200) {
                        if ((data.data.data.confidence1 +
                                data.data.data.confidence2 +
                                data.data.data.confidence3 +
                                data.data.data.confidence4 +
                                data.data.data.confidence5 +
                                data.data.data.confidence6 +
                                data.data.data.confidence7) / 7 < 0.8) {
                            layer.open({
                                content: "识别成功请核查车牌号是否正确"
                                , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                                , time: 3
                            });
                            $("#licensePlateNumber").val(data.data.data.number)
                        } else {
                            layer.open({
                                content: "车牌号识别成功"
                                , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                                , time: 3
                            });
                            $("#licensePlateNumber").val(data.data.data.number)
                            $("#licensePlateNumberValidation").hide
                                = document.getElementById("licensePlateNumber");
                            licensePlateNumber.style.border = '0';
                            licensePlateNumber.placeholder = '';
                        }

                    } else {
                        layer.open({
                            content: "未识别到车牌请上传清晰的车牌照"
                            , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                            , time: 3
                        });
                        $("#licensePlateNumber").val("")
                    }
                }else if (data.code===500){
                    layer.open({
                        content: "未识别到车牌请上传清晰的车牌照"
                        , style: 'background-color:#09C1FF; color:#fff; border:none;' //自定风格
                        , time: 3
                    });
                    $("#licensePlateNumber").val("")
                }


            },
            error : function(data)// 服务器响应失败处理函数
            {
                alert("服务器");
                console.log("服务器异常");
            }
        });
        return false;
    }*/

    function save() {
        if($("#imghead").attr("src")==""){
            layer.open({
                content: '请上传车牌照片',
                btn: '我知道了',
                shadeClose: false
            });
            return;
        }
        if($("#carBodyNumberimg").attr("src")==""){
            layer.open({
                content: '请上传车身照片',
                btn: '我知道了',
                shadeClose: false
            });
            return;
        }
        if($("#licensePlateNumberPhoto").attr("value")==""){
            layer.open({
                content: '请上传车牌照片',
                btn: '我知道了',
                shadeClose: false
            });
            return;
        }
        if($("#carPhoto").attr("value")==""){
            layer.open({
                content: '请上传车身照片',
                btn: '我知道了',
                shadeClose: false
            });
            return;
        }


       /* if (licensePlateNumber.value == '') {
            layer.open({
                content: '车牌号码不能为空',
                btn: '我知道了',
                shadeClose: false
            });
            return;
        } else {
            if (checkLicensePlateNumber() == false) {
                return;
            }
        }

        if($("#typeAndModel").html().trim()==''){
        	 layer.open({
                 content: '请选择车型',
                 btn: '我知道了',
                 shadeClose: false
             });
             return;
        }*/
/*
        if(frameNumber.value==''){
            layer.open({
                content: '车架号码不能为空',
                btn: '我知道了',
                shadeClose: false
            });
            return false;
        }
        if(engineNumber.value==''){
            layer.open({
                content: '发动机号不能为空',
                btn: '我知道了',
                shadeClose: false
            });
            return false;
        }
*/
        var cardCode=[[${card_code}]];
        $.ajax({
            url: "/verification",
            data: $("#verification").serialize(),
            type: "post",
            dataType: "json",
            success: function (data) {
                alert(data);
                var data=JSON.parse(data);
                if (data.code == "1") {
                    window.location = '/picc/verification/success/'+cardCode;
                } else {
                    layer.open({
                        content: data.msg,
                        btn: '我知道了',
                        shadeClose: false
                    });

                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert("提交失败" + textStatus);
            }

        });
    }
</script>
</body>
</html>
